<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一个 JQuery 程序</title>
    <!-- 第一：下载JQ -->

    <!-- 第二：在页面中，导入 JQ 文件 -->
    <script src="../jquery-3.7.1.js"></script>

    
</head>
<body>
    <table id="tbl" border="1" width="80%" align="center">
        <tr id="first">
            <td>11</td>
            <td>22</td>
            <td>33</td>
            <td>44</td>
            <td>55</td>
        </tr>
        <tr>
            <td>11</td>
            <td>22</td>
            <td>33</td>
            <td>44</td>
            <td>55</td>
        </tr>
        <tr>
            <td>11</td>
            <td>22</td>
            <td>33</td>
            <td>44</td>
            <td>55</td>
        </tr>
        <tr>
            <td>11</td>
            <td>22</td>
            <td>33</td>
            <td>44</td>
            <td>55</td>
        </tr>
        <tr>
            <td>11</td>
            <td>22</td>
            <td>33</td>
            <td>44</td>
            <td>55</td>
        </tr>
        <tr>
            <td>11</td>
            <td>22</td>
            <td>33</td>
            <td>44</td>
            <td>55</td>
        </tr>
    </table>

    <!-- 第三：使用 JQ -->
    <script>
        
        // $("#tbl tr:even:not(:first)").css("background","red") ;
        // $("#tbl tr:even").not($("#first")).css("background","red") ;
        $("#tbl tr:even").css("background","red") ;
        $("#tbl tr:odd").css("background","yellow") ;

        $("#tbl tr:first").css("background","black")
            .css("color","white") ;
        
    </script>
</body>
</html>